package com.scott.crm.role.dao;

import com.scott.crm.role.bean.UserRoleBean;
import com.scott.crm.user.bean.UserBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.List;

/**
 * @author 王伟雄
 * @create 2021/11/29 15:47
 */
@Mapper
public interface UserRoleDao extends BaseMapper<UserRoleBean> {

    List<UserRoleBean> findAllLimit(@Param("begin") Integer begin, @Param("end") Integer end);

    List<UserRoleBean> findAllLimitByRoleName(@Param("begin") Integer begin, @Param("end") Integer end,@Param("userRoleBean") UserRoleBean userRoleBean);

    List<UserRoleBean> findAll();

    List<UserRoleBean> findAllByRoleName(@Param("userRoleBean") UserRoleBean userRoleBean);

    Integer deleteUserRole(List<Integer> ids);
}
